import { defineStore } from "pinia"
import {  ref } from "vue"

export const userInfoStore = defineStore("userInfo", () => {
        // 属性
        const info = ref({})

        // setters
        const setInfo = (newInfo) => {
            info.value = newInfo
        }

        const removeInfo = () => {
            info.value = {}
        }

        return {info, setInfo, removeInfo}
    },
    {
        persist: true
    })

export default userInfoStore;